package com.partners.controller.Page;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;

/**
 * @author liangyongle
 * @date 2019-01-11
 */
@Controller
@RequestMapping("share")
public class SharePageController {

//     @GetMapping("test")
//     public ModelAndView taskInfo(HttpSession session, @RequestParam(value="id",required =false) Integer id){
//         JSONObject jsonObject = sessionManager.JsonSession(session);
//         Integer uid = jsonObject.getInteger("userId");
//         String openId = jsonObject.getString("openid");
//         //判断uid是否存在，不存在就增加浏览量
//         if(uid == 0){
//             taskService.addReadTask(openId,id);
//         }
//         ModelAndView mav = new ModelAndView("show/task_info");
//         mav.addObject("id",id);
//         mav.addObject("uid",uid);
//         return mav;
//
//     }

}
